package cn.cloudplug.friendsrecommend.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.DashPathEffect;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PathEffect;
import android.view.View;
import android.util.AttributeSet;
public class DashedLineView extends View {

	
	
    public DashedLineView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
	}

	protected void onDraw(Canvas canvas) {      
        // TODO Auto-generated method stub      
        super.onDraw(canvas);              
        Paint paint = new Paint();      
        paint.setStyle(Paint.Style.STROKE);      
        paint.setColor(Color.DKGRAY);
        paint.setStrokeWidth(3);
        Path path = new Path();           
        path.moveTo(0, 0);      
        path.lineTo(800,0);            
        PathEffect effects = new DashPathEffect(new float[]{5,5,5,5},1);      
        paint.setPathEffect(effects);      
        canvas.drawPath(path, paint);      
    }   
}
